1. Field of the Invention
The present invention generally relates to automatic control systems, and more specifically, relates to compensation or filter devices within control loops.
2. Description of the Related Art
Automatic control systems for electro-mechanical devices have control loops that perform certain functions. Control loops vary depending upon the type of control necessary for the electro-mechanical device to perform its intended act. Generally, such loops comprise position, velocity, acceleration, or force control loops, for example, to control these physical properties. The discussion hereafter focuses on a velocity control loop for a disk drive, but is additionally applicable to the other types of control loops.
Disk drives of today face more challenges than ever due to their use and requirements. No longer are disk drives simply faced with operating in a controlled, stationary environment as when mainframe or desktop computers were the primary usages of disk drives. Today""s disk drives are used in portable computers, portable CD players, and other electronic devices. Furthermore, there is a technological need for disk drives to be reduced in size and weight and be more robust to external disturbances and environmental conditions.
Stresses placed on today""s disk drives, such as acoustic noise, motor wear out, motor torque ripple, and motor speed control accuracy demand more robust, fast response automatic control system designs for regulating the speed of the sinusoidal spindle motor within the disk drive. A velocity control loop within the automatic control system plays an important role in not only maintaining a constant spin velocity of the disk, but also in compensating for the mechanical dynamics of, and the external disturbances applied to the disk drive.
Disk drives have a velocity control loop operating within an automatic control system for controlling and regulating the velocity of the sinusoidal spindle motor to spin at a constant velocity. To maintain the constant velocity, the velocity control loop receives a reference frequency input signal. A feedback frequency signal output from the sinusoidal spindle motor is compared to the reference frequency input signal to determine if a delta or error therebetween exists. A compensator or filter may be used to compensate the error, with the filtered error used to control a drive circuit that regulates the velocity of the disk motor.
The mechanical dynamics of the disk drive are defined by the mechanical design of the disk drive. The spindle motor contains dynamics, such as resonance frequencies, which may be modeled by a transfer function having poles and zeros, as is commonly known to one of ordinary skill in the art of automatic control systems. Performance of the disk drive system, which includes the spindle motor and automatic control system, is dictated by the effectiveness of compensation placed into the velocity control loop thereof. Performance from a control system point of view includes stability and tracking. Stability is a function of gain and phase margins. Tracking is a reflection of gain. Without compensating (i.e., filtering) the velocity control loop, the disk drive would oscillate due to the spindle motor having a low frequency pole (i.e., long time constant).
Conventional compensators within velocity control loops are analog devices or alternatively comprise software operating within either a microprocessor or signal processor. A conventional analog design of a compensator to operate within a velocity control loop comprises an analog circuit, possibly including a single integrated circuit (i.e., chip). In order to provide compensation characteristics (i.e., poles and zeros) using these analog integrated circuit compensators, however, external passive components (i.e., resistors and capacitors) are necessary. Using the external passive components increases manufacturing costs, control loop size, and power consumption. Also, an analog integrated circuit degrades performance of the system due to current leakage and electromagnetic noise effects. The current leakage is generally due to environmental factors, such as temperature and humidity, making velocity control more difficult and less accurate.
Two conventional ways that microprocessor based velocity control loops perform include: (1) detecting the motor frequency and passing the motor frequency to the microprocessor, which may or may not have a controller having on-board filtering components, and (2) measuring the spindle motor frequency and filtering the measured signal using a digital filter on-board the microprocessor. Both of these approaches have a drawback of requiring the microprocessor to be-interrupted to receive the measured motor frequency and to perform the filtering for the velocity control. Additionally, if a processor is operating not only a velocity control loop, but also operating one or more control loops and performing other tasks within the system, the processor will likely have its processing resources stressed.
One problem with the conventional compensators or filters is analog filters cannot have dynamic modification of filter coefficients. Digital filters implemented as software within general processors that control other portions of the system are interrupted at each sample interval to perform filter processing. Another problem with conventional compensators is that the compensation, in general, is second order or higher and the compensators are implemented as second order or higher filters, thereby increasing processing time.
In accordance with the principles of the present invention, one embodiment for overcoming the shortcomings of the conventional compensators is a disk drive having a motor for spinning a disk and a velocity control loop, which includes a frequency detector and a filter. The frequency detector, which generates an error signal, is connected to an input terminal and an output terminal of the velocity control loop. The filter is at least a second order filter connected to an output terminal of the frequency detector. The filter includes a filter section and an accumulator. At least one filter coefficient is received by the filter section, which is at least a first order filter. One embodiment of the filter section is an infinite impulse response filter. The filter coefficient(s) define a transfer function for the filter. One embodiment of the filter is a digital integrated circuit.
Another embodiment of the present invention is a method for compensating a control loop within an automatic control system. An input signal is received and filtered. The filtering includes performing an infinite impulse response filtering, accumulating the signal produced by the infinite impulse response filtering, and outputting the accumulated signal. The control loop may be a position, velocity, acceleration or force control loop. Filter coefficient(s) are dynamically received and applied to the infinite impulse response filtering.
Another embodiment of the present invention is a programmable digital integrated circuit having a filter section cascaded with an accumulator. The filter section, being at least a first order filter, utilizes at least one filter coefficient dynamically received on a bus, such as a serial bus, to compensate an input signal to produce a first compensated signal. The accumulator receives the first compensated signal and produces a second compensated signal, which is an output signal from the integrated circuit. The integrated circuit further includes memory elements to store the filter coefficients, thereby eliminating the need for external components. An alternate embodiment is a hybrid having an analog section and a digital section.